package lxy;

public class Thread01 {

        public static void main(String[] args) {
            testThread t1 = new testThread();
            testThread t2 = new testThread();

            t1.start();
            t2.start();

        }
    }
    class testThread  extends Thread{
        @Override
        public void run() {
            for (int i = 0; i < 10; i++) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName() + " = " + i);
            }
        }
    }

